/**
 * Created by lixiaoping on 15/10/23.
 */
require.config(require_config);

define([
    'jquery',
    'common',
    'ready',
    'template',
    'model',
    'dialog'
], function( $, common, ready, template, Model, dialog ) {
    var index = function() {
        this.init();
    };
    index.prototype = {
        init: function() {
            loading();
            this.fetch();
            this.event();
        },

        fetch: function() {
            this.model = new Model({
                container: 'main-view',
                template: 'order-tpl',
                tag_name: 'div',
                url: _global.url.api + 'order/'+id,
                callback: function() {
                    loaded();
                }
            });
            this.model.fetch();
        },

        event: function() {
            //
        }
    };

    new index();

});